import request from '@/utils/request'

export function configure(query) {
  return request({
    url: '/mes/smt/configure',
    method: 'get',
    params: query
  })
}
export function addconfigure(data) {
  return request({
    url: '/mes/smt/configure',
    method: 'post',
    data
  })
}
export function delconfigure(id) {
  return request({
    url: `/mes/smt/configure/del/${id}`,
    method: 'post'

  })
}
export function updateconfigure(data) {
  return request({
    url: '/mes/smt/configure',
    method: 'put',
    data
  })
}
// 防错
export function addrecord(data) {
  return request({
    url: '/mes/smt/record',
    method: 'post',
    data
  })
}
export function getrecord(query) {
  return request({
    url: '/mes/smt/record',
    method: 'get',
    params: query
  })
}
export function getrecorddetail(id) {
  return request({
    url: `/mes/smt/record/${id}`,
    method: 'get'

  })
}

export function delrecord(id) {
  return request({
    url: `/mes/smt/record/del/${id}`,
    method: 'post'

  })
}
export function updaterecord(data) {
  return request({
    url: '/mes/smt/record',
    method: 'put',
    data
  })
}
export function downLoadFile(data) {
  return request({
    url: `/mes/smt/expExcel`,
    method: 'get',
    responseType: 'arraybuffer',
    params: data
  })
}

